package com.vincent.sciinfo.controller;

import com.vincent.sciinfo.pojo.TakeMeeting;
import com.vincent.sciinfo.service.TakeMeetingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/takemeeting")
public class TakeMeetingController {

    @Autowired
    private TakeMeetingService takeMeetingServer;

    @RequestMapping("/selectByMeetingId")
    public List<TakeMeeting> selectByMeetingId(@RequestParam Integer meetingid) {
        return takeMeetingServer.selectByMeetingId(meetingid);
    }


    @RequestMapping("/takeMeeting")
    public int takeMeeting(@RequestParam int meetingid, @RequestParam String teacherId){
        return takeMeetingServer.takeMeeting(meetingid, teacherId);
    }

}
